package com.victor.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.victor.entity.finefood.Food;
import com.victor.entity.happy.Happy;
import com.victor.entity.hotel.Hotel;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 商家后台登录表
 * 
 * @author zhangbin
 *
 */
@Entity
@Table(name = "shop_user_login")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ShopUserLogin {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY) // 主键类型--自动递增生成
	@Column(name = "id", unique = true, nullable = false, length = 11)
	private Integer id;// 主键

	@Column(name = "account", length = 50)
	private String account;// 商家后台登录账号

	@Column(name = "password", length = 50)
	private String password;// 商家后台登录密码

	@Column(name = "shoptype", length = 50)
	private String shoptype;// 商家类型 1.酒店,2.美食,3.娱乐

	@Column(name = "shopid", length = 50)
	private String shopid;// 对应商家id

	@Transient
	private Hotel hotel;// 对应酒店信息

	@Transient
	private Food food;// 对应美食信息

	@Transient
	private Happy happy;// 对应娱乐信息

}
